package com.doraemon.module.buyer.dto;

import com.doraemon.module.buyer.entity.OrderDetail;
import com.doraemon.module.buyer.serializer.Date2LongSerializer;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 *
 * @author doraemon
 * @date 2017/9/14
 */
@Data
/**
 *@JsonInclude(JsonInclude.Include.NON_NULL)
 */
public class OrderDTO {
    /**订单ID.*/
    private String orderId;
    /**下单人姓名.*/
    private String buyerName;
    /**下单人电话.*/
    private String buyerPhone;
    /**下单人住址.*/
    private String buyerAddress;
    /**买家微信openid.*/
    private  String buyerOpenid;
    /**订单总金额.*/
    private BigDecimal orderAmount;
    /**订单状态, 默认为新下单.*/
    private Integer orderStatus ;
    /**支付状态, 默认未支付.*/
    private Integer payStatus;
    /**创建时间.*/
    @JsonSerialize(using = Date2LongSerializer.class)
    private Date createTime;
    /**更新时间.*/
    @JsonSerialize(using = Date2LongSerializer.class)
    private Date updateTime;
    /**订单详情 .*/
    List<OrderDetail> orderDetailList;
}
